<?php
class general
{
    function ketnoi($query){
        $connect = mysql_connect("localhost","root", "vertrigo");
        mysql_select_db("docs", $connect);
        mysql_query("SET charater_set_result_utf8");
        $ret = mysql_query(($query, $connect))
        $data = array();
        while($row = mysql_fetch_assoc($ret)){
            $data [] = $row;
        }
        return $data;
    }
    function xemhet($noixem){
        $query = "SELECT + FROM" + $noixem;
        $this->ketnoi($query);
    }
    function xem($noixem, $canxem){
        $query = "SELECT + FROM " + $noixem+ "WHERE "+$canxem;
        $this->ketnoi($query);
    }
    function them($noithem, $canthem){
        $query = "SELECT +FROM "+$noithem+ "WHERE "+$canthem;
        $this->ketnoi($query);
    }
}